package myschool.test3;

import myschool.dao.ExamDao;
import myschool.entity.ExamResult;
import myschool.util.MyBatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestAsscoSubject2 {
    public static void main(String[] args) {
        SqlSession s= MyBatisUtil.get();
        ExamDao mapper=s.getMapper(ExamDao.class);
        List<ExamResult> examResults = mapper.pag3(1, 10);
        System.out.println(examResults+"???????????");
        examResults.forEach(x->{
            System.out.println("成绩信息："+x);
            System.out.println("\t课程是"+x.getSubject());
        });
        MyBatisUtil.close(s);
    }
}
